﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Data;

namespace QuanLyThuChi
{
    class connect
    {
        public OleDbConnection ketnoi()
        {
         
                OleDbConnection con = new OleDbConnection(); //tạo kết nối
                con.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_thuchi.mdb";
                if (con.State == ConnectionState.Closed)
                {
                    con.Open();
                }
                else
                {
                    con.Close();
                }
                return con;                                   
        }
    }
}
